//
//  YHWaterFlowLayout.h
//  UI15_CustomCollectionViewLayout
//
//  Created by dllo on 16/8/3.
//  Copyright © 2016年 yh. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol YHWaterFlowLayoutDelegate <NSObject>
// 计算高度的方法
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout widtgh:(CGFloat)width heightForItemAtIndexPath:(NSIndexPath *)indexPath;

@end



// 自定义布局继承于 UICollectionViewLayout

@interface YHWaterFlowLayout : UICollectionViewLayout
// collectionVIew的列数 
@property (nonatomic, assign) NSInteger numberOfColumns;
@property (nonatomic, weak) id <YHWaterFlowLayoutDelegate>delegate;
// cell间间距
@property (nonatomic, assign) CGFloat cellMargin;


@end
